package com.csxy.six.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.csxy.six.entity.AnnouncementAttachment;
import com.csxy.six.mapper.AnnouncementAttachmentMapper;
import com.csxy.six.service.AnnouncementAttachmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AnnouncementAttachmentServiceImpl extends ServiceImpl<AnnouncementAttachmentMapper, AnnouncementAttachment>
        implements AnnouncementAttachmentService {

    @Autowired
    private AnnouncementAttachmentMapper attachmentMapper;

    //根据公告ID获取该公告的所有附件列表
    @Override
    public List<AnnouncementAttachment> getByAnnounceId(Integer announceId) {
        return attachmentMapper.selectByAnnounceId(announceId);
    }
}
